<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>登录</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="robots" content="all,follow">
	<!--<link rel="stylesheet" href="./Assets/css/bootstrap.min.css">-->
    <link rel="stylesheet" href="./css/style.default.css" id="theme-stylesheet">
	<!--<script src="./jquery-3.6.4.js"></script>
	<script src="./ajax.js"></script>-->
	
  </head>
  <body>
    <div class="page login-page">
      <div class="container d-flex align-items-center">
        <div class="form-holder has-shadow">
          <div class="row">
            <!-- Logo & Information Panel-->
            <div class="col-lg-6">
              <div class="info d-flex align-items-center">
                <div class="content">
                  <div class="logo">
                    <h1>欢迎登录</h1>
                  </div>
                  <p>农业云游学网站</p>
                </div>
              </div>
            </div>
            <!-- Form Panel    -->
            <div class="col-lg-6 bg-white">
			  <div style="float:right"><a href="./index.html">返回首页&nbsp;&nbsp;&nbsp;&nbsp;</a></div>
              <div class="form d-flex align-items-center">
                <div class="content">
                  <div >
                    <div class="form-group">
                      <input id="login-username" type="text" name="userName" required data-msg="请输入用户名" placeholder="用户名"  class="input-material">
                    </div>
                    <div class="form-group">
                      <input id="login-password" type="password" name="passWord" required data-msg="请输入密码" placeholder="密码" class="input-material">
                    </div>
                    <button id="login" type="submit" class="btn btn-primary">登录</button>
                    
                  </div>
                  <br />
                  <small>没有账号?</small><a href="./register.html" class="signup">&nbsp;注册</a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <!--<script>
    	$(document).ready(function(){
    		
    		/*登录*/
    		$("#login").click(function(){
    			var userName=$("#login-username").val();
    			var passWord=$("#login-password").val();
    			
				console.log(userName,passWord);
				$.ajax({
					type:"POST",
					url:"http://localhost:3000/login",
					data:{
						userName:userName,
						passWord:passWord
					},
					success:function(data){
						console.log(data);
						if(data.length===0){
							alert("请输入正确的用户名或密码");
						}else{
							alert("登录成功呀，跳转主页！");
							// 跳转到index.html页面
							window.location.href = 'index.html';
						}
					},
					error:function(err){
						alert(err);
					}
				});
    		})
				
    		
    		
		})
    </script>-->


  </body>
</html>